package com.xiangge.zuoye2;

public class Demo4 {
    public static void main(String[] args) {
        int sum = 2;
        //3 2+2 6 4+(4/2)*2 9 8+(8/2)*2 12 15 18
        for (int i = 1; i <= 20; i++) {
            if (i%3==0){
                sum = sum*2;
            }
        }
        System.out.println("二十个月的兔子对数为:" + (sum/2));
    }
}
